package com.epower.dao.epowerwordfrequency.impl;

import java.util.List;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import com.ali.luna.commons.dao.BaseDAOImpl;
import com.epower.dao.epowerwordfrequency.EpowerWordFrequencyDAO;
import com.epower.dataobject.EpowerWordForDayDO;
import com.epower.dataobject.EpowerWordFrequencyDO;

@Scope("singleton")
@Component("epowerWordFrequencyDAO")
@SuppressWarnings("unchecked")
public class EpowerWordFrequencyDAOImpl extends BaseDAOImpl implements EpowerWordFrequencyDAO {

    @Override
    public List<EpowerWordFrequencyDO> queryEpowerWordFrequencyBySpelling(String spelling) {
        return (List<EpowerWordFrequencyDO>) getSqlMapClientTemplate().queryForList("EpowerWordFrequencyDAOImpl.GET-EPOWERWORDFREQUENCYDOList-BY-OPTION", spelling);
    }

    @Override
    public List<EpowerWordFrequencyDO> getEpowerWordFrequencyListPageByOption(EpowerWordFrequencyDO query) {
        return (List<EpowerWordFrequencyDO>)getSqlMapClientTemplate().queryForList("EpowerWordFrequencyDAOImpl.GET-EPOWERWORDFREQUENCYList-BY-OPTION",query);
       
    }
    
    /***
     * 查询数量
     */
    @Override
    public Integer getEpowerWordFrequencyCountByOption(EpowerWordFrequencyDO epowerWordForDay) {
        return (Integer) getSqlMapClientTemplate().queryForObject("EpowerWordFrequencyDAOImpl.GET-EPOWERWORDFREQUENCY-COUNT-BY-OPTION", epowerWordForDay);
    }
}
